import { connect } from 'react-redux'
import OrderLogistics from '../../../views/My/MyOrder/OrderLogistics'

function mapStateToProps(state: any) {
    return {
        userInfo: state.user.userInfo,
        expressInfo: state.user.expressInfo
    }
}

function mapDispatchToProps(dispatch: (obj: any) => void) {
    return {
        'SET_USER_ORDERDATA': (data: any, status: number) => {
            dispatch({ type: 'SET_USER_ORDERDATA', data, status })
        },
        'SET_USER_EXPRESSINFO': (data: number) => {
            dispatch({ type: 'SET_USER_EXPRESSINFO', data })
        }
    }
}

export default connect(mapStateToProps, mapDispatchToProps)(OrderLogistics)